
scoreboard objectives add mobhealth dummy

execute as @e[type=!player] store result score @s mobhealth run data get entity @s Health 1
#execute as @e[type=!player,scores={mobhealth=21..}] at @s run data merge entity @s {CustomName:'{"text":"❤❤❤❤❤❤❤❤❤❤","color":"light_purple","obfuscated":true}'}
execute as @e[type=!player,scores={mobhealth=20}] at @s run data merge entity @s {CustomName:'{"text":"❤❤❤❤❤❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=19}] at @s run data merge entity @s {CustomName:'{"text":"♡❤❤❤❤❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=18}] at @s run data merge entity @s {CustomName:'{"text":"❤❤❤❤❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=17}] at @s run data merge entity @s {CustomName:'{"text":"♡❤❤❤❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=16}] at @s run data merge entity @s {CustomName:'{"text":"❤❤❤❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=15}] at @s run data merge entity @s {CustomName:'{"text":"♡❤❤❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=14}] at @s run data merge entity @s {CustomName:'{"text":"❤❤❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=13}] at @s run data merge entity @s {CustomName:'{"text":"♡❤❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=12}] at @s run data merge entity @s {CustomName:'{"text":"❤❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=11}] at @s run data merge entity @s {CustomName:'{"text":"♡❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=10}] at @s run data merge entity @s {CustomName:'{"text":"❤❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=9}] at @s run data merge entity @s {CustomName:'{"text":"♡❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=8}] at @s run data merge entity @s {CustomName:'{"text":"❤❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=7}] at @s run data merge entity @s {CustomName:'{"text":"♡❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=6}] at @s run data merge entity @s {CustomName:'{"text":"❤❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=5}] at @s run data merge entity @s {CustomName:'{"text":"♡❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=4}] at @s run data merge entity @s {CustomName:'{"text":"❤❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=3}] at @s run data merge entity @s {CustomName:'{"text":"♡❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=2}] at @s run data merge entity @s {CustomName:'{"text":"❤","color":"red"}'}
execute as @e[type=!player,scores={mobhealth=1}] at @s run data merge entity @s {CustomName:'{"text":"♡","color":"red"}'}

schedule function mob_health:mob_health 1s replace
